Learning Core Data for iOS: A Hands-On Guide to Building Core Data Applications (Jason Arnold's Library) by Tim Roadley
Author:Tim Roadley
Language: eng
Format: epub
Publisher: Addison-Wesley Professional
Published: 2014-08-15T00:00:00+00:00
To deep copy objects, several methods from the previous chapter will be used. The deep copy process will rely on a unique attribute name being chosen for each entity upfront. This allows a uniqueness check to take place prior to an object being copied, which prevents duplicated data. The following shows the high-level process for performing a deep copy:
An instance of CoreDataImporter is created with an NSDictionary of entity names mapped to a unique attribute per entity.
An NSArray of entity names to copy is given to the CoreDataImporter instance, which it iterates through one by one, copying all objects for each entity as required. You only need to specify the entities you want copied. Related objects of entities earmarked for copy will be copied regardless, however.
If equivalent objects from the source context don’t already exist in the target context, new managed objects are inserted. New objects are given the attribute values of the source object.
If a source object has a relationship, it is walked to find the related object(s). Related object(s) are copied to the target context as required.
Once all objects involved in a relationship exist in the target context, the relationship itself is reformed from the copied object to the related copied object(s) as previously illustrated in Figure 9.2 and Figure 9.3.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7810)
Grails in Action by Glen Smith Peter Ledbrook(7720)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6864)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6862)
Running Windows Containers on AWS by Marcio Morales(6393)
Kotlin in Action by Dmitry Jemerov(5092)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5082)
Combating Crime on the Dark Web by Nearchos Nearchou(4659)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4644)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4438)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4348)
The Age of Surveillance Capitalism by Shoshana Zuboff(3985)
Python for Security and Networking - Third Edition by José Manuel Ortega(3904)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3568)
Learn Wireshark by Lisa Bock(3555)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3530)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3359)
Blockchain Basics by Daniel Drescher(3329)
